<template>
  <div class="default-layout">
    <Header></Header>
    <div class="default-layout-main flex-1">
      <RouterView />
    </div>
    <ClientOnly>
      <ToolsFloat v-if="!isActivity" />
      <ActivityFloat v-else />
    </ClientOnly>
    <Footer />
  </div>
</template>
<script lang='ts' setup>
import Header from './Header.vue'
import ToolsFloat from '@/components/ToolsFloat/index.vue';
import Footer from './Footer.vue'
import { setCustomSeoInfo } from '@/composables/useCustomSeoMeta.ts'
import ActivityFloat from '@/components/ToolsFloat/activityFloat'
import { useRouter } from 'vue-router';

setCustomSeoInfo() // 使用 route 自定义TDK，同其它地方有 useSeoMeta 会被覆盖
const router = useRouter()
const isActivity = computed(() => {
  return router.currentRoute.value.name === 'activity'
})
</script>
<style scoped lang='scss'>
.default-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
</style>
